From 255000dac7b8013ba994848cd4661a61d9a31acf Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Fri, 16 Sep 2005 16:48:44 -0600 Subject: [PATCH] Script to generate diffs between linux-xen subdirs and real linux --- xen/arch/ia64/tools/linux-xen-diffs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 xen/arch/ia64/tools/linux-xen-diffs diff --git a/xen/arch/ia64/tools/linux-xen-diffs b/xen/arch/ia64/tools/linux-xen-diffs new file mode 100644 index 0000000000..939ba47861 --- /dev/null +++ b/xen/arch/ia64/tools/linux-xen-diffs @@ -0,0 +1,25 @@ +# generate a patch for all the files in linux-xen directories +# (these are files that are identical to linux except for a few small changes) +# run in the main xen directory +LINUXPATH=/home/djm/linux-2.6.13 +OUTFILE=/tmp/linux-xen-diffs +wd=$PWD +for i in include/asm-ia64/linux-xen/asm include/asm-ia64/linux-xen/linux arch/ia64/linux-xen +do +echo '#############' $i '#############' +cd $i +ln -s $LINUXPATH xxx +cat README.origin | grep -v '^#' | grep -v '^[ ]*$' | \ + sed -e 's/[ ]*-> linux/ xxx/' | \ + sed -e 's/^/diff -Naur /' | bash +rm -f xxx +cd $wd +done > $OUTFILE +echo 'Total lines in patch:' `cat $OUTFILE | grep -v '########' | wc -l` +echo 'Approx. changes in patch:' `cat $OUTFILE | grep -v '########' | \ + grep -- '-#if' | wc -l` +echo 'Total lines added by patch:' `cat $OUTFILE | grep -v '########' | \ + grep -- '^-' | wc -l` +echo 'Total non-conditional-compile lines added by patch:' \ + `cat $OUTFILE | grep -v '########' | grep -- '^-' | \ + egrep -v '^-#if|^-#else|^-#endif' | wc -l` -- 2.30.2